import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class BlackButton extends StatelessWidget {
  const BlackButton({super.key, required this.icon, this.size, this.onTap});

  final IconData icon;
  final double? size;
  final VoidCallback? onTap;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        width: 26.w,
        height: 26.w,
        decoration: ShapeDecoration(
          color: const Color(0xFF161D1B),
          shape: RoundedRectangleBorder(
            side: BorderSide(
              width: 1.w,
              strokeAlign: BorderSide.strokeAlignOutside,
              color: Colors.white,
            ),
            borderRadius: BorderRadius.circular(200.r),
          ),
        ),
        child: Center(
          child: Icon(icon, color: Colors.white, size: size ?? 16.w),
        ),
      ),
    );
  }
}
